package com.forenow.demo.Game;

import java.util.Scanner;

public class Go {
    public boolean isgo(){
        System.out.print("要开始吗（y/n）：");
        Scanner scanner=new Scanner(System.in);
        String isgoon=scanner.next();
        Go go=new Go();
        switch (isgoon){
            case "y": return true;
            case "n":System.exit(0);
            default:
                System.out.println("请输入y或n");
                go.isgo();
        }
        return false;
    }
}
